Common Translations update from Hosted Weblate - #691
Conversation
1ba320d to
16f78c8
Compare
a9bc4cb to
471602b
Compare
471602b to
45aa612
Compare
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe change updates shared locale content for Catalan, Catalan Valencian, Hebrew, Indonesian, and Portuguese. It adds translations, fills empty entries, revises messages, and adds interpolation placeholders. ChangesLocale translation updates
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@public/locales/he/common.json`:
- Around line 26-30: Remove the empty Hebrew translation entries under the
visible translation section, including using_android, using_ios, video, and
download_splitpro_data, so next-i18next can use fallback text instead of
retaining blank labels.
In `@public/locales/id/common.json`:
- Line 43: Correct the value of the "zoom" translation key in common.json from
the misspelled "Zom" to "Zoom" or the approved Indonesian localization term.
- Around line 1-3: Add the Indonesian locale identifier "id" to the i18n.locales
configuration in next-i18next.config.js and to the supported-language list in
src/utils/i18n/client.ts, preserving the existing locale entries and ordering
conventions.
- Line 346: Update the in_splitpro translation value from “di Splitpro” to “di
SplitPro” in the common locale, preserving the established SplitPro brand
casing.
In `@public/locales/pt-PT/common.json`:
- Line 321: Update the default_balance_currency_cleared translation to use PT-PT
wording for a removed currency, replacing “zerada” with “removida” or
“eliminada”.
- Line 289: Update the “cant_delete” translation in the Portuguese locale to
replace the grammatically incorrect “todos acerte” wording with a clear passive
construction, preserving the warning’s existing meaning.
- Around line 163-164: Update the image_compression_failed translation to use
“Tente enviar” instead of “Tentar a enviar”, and correct “Error” to “Erro” in
import_failed while preserving the rest of each Portuguese message.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aec2457f-c8a4-4ca9-baec-d852dd9ab17e
📒 Files selected for processing (5)
public/locales/ca/common.jsonpublic/locales/ca@valencia/common.jsonpublic/locales/he/common.jsonpublic/locales/id/common.jsonpublic/locales/pt-PT/common.json
| "using_android": "", | ||
| "using_ios": "", | ||
| "video": "" | ||
| }, | ||
| "download_splitpro_data": "", |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 5 'returnEmptyString|fallbackLng|fallbackLocale|i18next|next-intl|public/locales|common\.json' .Repository: oss-apps/split-pro
Length of output: 43526
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- next-i18next.config.js ---'
cat -n next-i18next.config.js
printf '%s\n' '--- i18n helpers ---'
cat -n src/utils/i18n/server.ts
cat -n src/utils/i18n/client.ts
printf '%s\n' '--- locale files and target keys ---'
git ls-files 'public/locales/*/common.json' | sort
python3 - <<'PY'
import json
from pathlib import Path
keys = [
("download_splitpro_data",),
("download_splitpro_data", "using_android"),
("download_splitpro_data", "using_ios"),
("download_splitpro_data", "video"),
]
for path in sorted(Path("public/locales").glob("*/common.json")):
try:
data = json.loads(path.read_text())
except Exception as exc:
print(path, "INVALID_JSON", exc)
continue
node = data
values = []
for keypath in keys:
node = data
for key in keypath:
node = node.get(key) if isinstance(node, dict) else None
values.append(( ".".join(keypath), node, type(node).__name__))
print(path, values)
PY
printf '%s\n' '--- translation configuration options ---'
rg -n -C 8 'i18n\.init|initReactI18next|returnEmptyString|fallbackNS|fallbackLng|defaultNS|ns:' src next-i18next.config.js next.config.js package.jsonRepository: oss-apps/split-pro
Length of output: 50374
🌐 Web query:
i18next returnEmptyString default fallback behavior official documentation
💡 Result:
In i18next, the returnEmptyString configuration option controls whether an empty string is treated as a valid translation result [1][2]. The default value for returnEmptyString is true [1][3][2]. When set to true (default), i18next accepts an empty string ("") as a valid translation, and it will be returned as the translation value [1][2]. If you want to prevent empty strings from being returned and instead trigger a fallback (for example, to a fallback language or the key itself), you should set returnEmptyString to false [4][5][6]. When this option is false, i18next treats an empty string as if the key were missing, causing the translation process to continue searching through fallback options [4][5].
Citations:
- 1: https://www.i18next.com/overview/configuration-options.md
- 2: https://www.i18next.com/overview/configuration-options
- 3: https://cdn.jsdelivr.net/npm/i18next@26.3.6/typescript/options.d.ts
- 4: https://www.i18next.com/principles/fallback
- 5: https://github.com/i18next/i18next-gitbook/blob/master/principles/fallback.md
- 6: Empty string causes fallback i18next/i18next#80
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- Hebrew target region ---'
sed -n '1,85p' public/locales/he/common.json
printf '%s\n' '--- English matching region ---'
sed -n '1,85p' public/locales/en/common.json
printf '%s\n' '--- all references to the namespace/key ---'
rg -n -C 4 'download_splitpro_data|using_android|using_ios' src public/locales
printf '%s\n' '--- locale enablement and translation wrappers ---'
rg -n -C 4 "['\"]he['\"]|supportedLanguages|getSupportedLanguages|customServerSideTranslations|serverSideTranslations|useTranslation" src next-i18next.config.js next.config.js --glob '!**/*.map'Repository: oss-apps/split-pro
Length of output: 50375
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json
from pathlib import Path
def lookup(obj, path):
for part in path.split("."):
if not isinstance(obj, dict) or part not in obj:
return "<missing>"
obj = obj[part]
return obj
paths = [
"download_splitpro_data.using_android",
"download_splitpro_data.using_ios",
"download_splitpro_data.video",
"download_splitpro_data",
]
for locale in ("he", "en", "default"):
path = Path("public/locales") / locale / "common.json"
if not path.exists():
print(locale, "<file missing>")
continue
data = json.loads(path.read_text())
print(locale, {key: lookup(data, key) for key in paths})
PYRepository: oss-apps/split-pro
Length of output: 559
🌐 Web query:
next-i18next default configuration returnEmptyString i18next options
💡 Result:
The returnEmptyString option is an i18next configuration setting that controls whether an empty string is treated as a valid translation result [1][2]. By default, it is set to true [1][2]. When set to false, i18next treats empty strings as missing translations, which triggers fallback mechanisms (such as falling back to a different language or returning the translation key) [3]. Because next-i18next is built on top of i18next, you can pass this option through to the underlying i18next instance. In your next-i18next configuration file (e.g., next-i18next.config.js), you should include it within the i18nextOptions object rather than at the root level of the configuration [4][5]. Placing it at the root level may cause warnings in some environments because next-i18next expects specific configuration keys [6]. Example usage: // next-i18next.config.js module.exports = { i18n: { defaultLocale: 'en', locales: ['en', 'de'], }, i18nextOptions: { returnEmptyString: false, // Set to false to treat empty strings as invalid }, //... other next-i18next specific options }; You can find comprehensive details on this and other i18next-specific settings in the official i18next configuration documentation [1].
Citations:
- 1: https://www.i18next.com/overview/configuration-options
- 2: https://cdn.jsdelivr.net/npm/i18next@26.3.6/typescript/options.d.ts
- 3: https://www.i18next.com/principles/fallback
- 4: https://github.com/i18next/next-i18next/blob/master/README.md
- 5: https://github.com/i18next/next-i18next/blob/3fd094c2/README.md
- 6: Some i18n configuration options throw warnings in NextJs 12.2.3 i18next/next-i18next#1920
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json
from pathlib import Path
targets = {
"account.download_app_details.using_android",
"account.download_app_details.using_ios",
"account.download_app_details.video",
"account.download_splitpro_data",
}
def lookup(data, dotted):
value = data
for part in dotted.split("."):
if not isinstance(value, dict) or part not in value:
return ("missing", None)
value = value[part]
return ("present", value)
he = json.loads(Path("public/locales/he/common.json").read_text())
en = json.loads(Path("public/locales/en/common.json").read_text())
config = Path("next-i18next.config.js").read_text()
print("next-i18next config overrides returnEmptyString=false:",
"returnEmptyString: false" in config or "returnEmptyString:false" in config)
print("Hebrew declared in next-i18next.config.js:", "'he'" in config or '"he"' in config)
for key in sorted(targets):
h_state, h_value = lookup(he, key)
e_state, e_value = lookup(en, key)
print(f"{key}: he={h_state}:{h_value!r}; en={e_state}:{e_value!r}")
if h_state == "present" and h_value == "":
print(f" i18next default outcome: empty string is retained unless returnEmptyString=false")
PY
if node -e "require.resolve('i18next')" >/dev/null 2>&1; then
node - <<'JS'
const i18next = require('i18next');
const instance = i18next.createInstance();
instance.init({
lng: 'he',
fallbackLng: 'en',
resources: {
he: { common: { sample: '' } },
en: { common: { sample: 'English fallback' } },
},
ns: ['common'],
defaultNS: 'common',
}).then(() => {
console.log('runtime default:', JSON.stringify(instance.t('sample')));
return instance.init({ returnEmptyString: false });
}).then(() => {
console.log('runtime returnEmptyString=false:', JSON.stringify(instance.t('sample')));
});
JS
else
echo "i18next runtime unavailable; no dependency execution performed"
fiRepository: oss-apps/split-pro
Length of output: 1107
Omit the empty Hebrew translations. When Hebrew is enabled, next-i18next retains "" by default and renders blank labels instead of fallback text. Hebrew is not currently listed in next-i18next.config.js.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@public/locales/he/common.json` around lines 26 - 30, Remove the empty Hebrew
translation entries under the visible translation section, including
using_android, using_ios, video, and download_splitpro_data, so next-i18next can
use fallback text instead of retaining blank labels.
| { | ||
| "account": { | ||
| "change_language": "Ubah bahasa", |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Register the id locale in both i18n registries.
next-i18next.config.js does not include id in i18n.locales, and src/utils/i18n/client.ts does not include id in its supported-language list. Add id to both locations. Otherwise, this translation file will not load or be selectable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@public/locales/id/common.json` around lines 1 - 3, Add the Indonesian locale
identifier "id" to the i18n.locales configuration in next-i18next.config.js and
to the supported-language list in src/utils/i18n/client.ts, preserving the
existing locale entries and ordering conventions.
| "remove_avatar": "Hapus avatar", | ||
| "select_avatar": "Pilih gambar", | ||
| "title": "Edit detail", | ||
| "zoom": "Zom" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix the typo in the zoom label.
Replace "Zom" with "Zoom" or the approved Indonesian term.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@public/locales/id/common.json` at line 43, Correct the value of the "zoom"
translation key in common.json from the misspelled "Zom" to "Zoom" or the
approved Indonesian localization term.
| "title": "Saldo tertunggak kelompok" | ||
| }, | ||
| "invite_message": { | ||
| "in_splitpro": "di Splitpro", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Preserve the SplitPro brand casing.
Change "di Splitpro" to "di SplitPro" to match the product name used elsewhere in this file.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@public/locales/id/common.json` at line 346, Update the in_splitpro
translation value from “di Splitpro” to “di SplitPro” in the common locale,
preserving the established SplitPro brand casing.
| }, | ||
| "messages": { | ||
| "balances_recalculated": "Saldos recalculados com sucesso", | ||
| "default_balance_currency_cleared": "Moeda de saldo padrão zerada", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use PT-PT wording for a cleared default currency.
zerada means “zeroed” and is not appropriate for removing a selected currency. Use removida or eliminada.
Proposed fix
- "default_balance_currency_cleared": "Moeda de saldo padrão zerada",
+ "default_balance_currency_cleared": "Moeda de saldo padrão removida",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "default_balance_currency_cleared": "Moeda de saldo padrão zerada", | |
| "default_balance_currency_cleared": "Moeda de saldo padrão removida", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@public/locales/pt-PT/common.json` at line 321, Update the
default_balance_currency_cleared translation to use PT-PT wording for a removed
currency, replacing “zerada” with “removida” or “eliminada”.
ea55f88 to
bb8b19b
Compare
Currently translated at 100.0% (325 of 325 strings) Added translation using Weblate (Indonesian) Added translation using Weblate (Catalan) Added translation using Weblate (Valencian) Translated using Weblate (Portuguese (Portugal)) Currently translated at 100.0% (325 of 325 strings) Translated using Weblate (Hebrew) Currently translated at 7.0% (23 of 325 strings) Co-authored-by: Akiva Goldman <akivazev@protonmail.com> Co-authored-by: Arif Budiman <arifpedia@gmail.com> Co-authored-by: Guillem Usach <guillem.usach@gmail.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: ssantos <ssantos@web.de> Translate-URL: https://hosted.weblate.org/projects/splitpro/common/he/ Translate-URL: https://hosted.weblate.org/projects/splitpro/common/id/ Translate-URL: https://hosted.weblate.org/projects/splitpro/common/pt_PT/ Translation: SplitPro/Common
bb8b19b to
974698f
Compare
Translations update from Hosted Weblate for SplitPro/Common.
Current translation status:
Summary by CodeRabbit